import 'package:mziot/app/data/cmd_entity.dart';
import 'package:mziot/generated/json/base/json_convert_content.dart';

CmdEntity $CmdEntityFromJson(Map<String, dynamic> json) {
  final CmdEntity cmdEntity = CmdEntity();
  final String? nodeDeviceId = jsonConvert.convert<String>(json['nodeDeviceId']);
  if (nodeDeviceId != null) {
    cmdEntity.nodeDeviceId = nodeDeviceId;
  }

  cmdEntity.commandMap = json['commandMap'];
  final int? current = jsonConvert.convert<int>(json['current']);
  if (current != null) {
    cmdEntity.current = current;
  }
  return cmdEntity;
}

Map<String, dynamic> $CmdEntityToJson(CmdEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['nodeDeviceId'] = entity.nodeDeviceId;
  data['commandMap'] = entity.commandMap as Map<String, List<String>>;
  data['current'] = entity.current;
  return data;
}
